/*
 * Copyright (c) 2011
 * UNPUBLISHED PROPRIETARY SOURCE CODE.
 */

package com.webservice.enums;

/**
 * Contains error codes.
 *
 * @author vkolodrevskiy
 */
public enum ErrorCode {
    UNHANDLED_EXCEPTION("1", "Unhandled exception."),
    NICKNAME_ALREADY_IN_USE("2", "Nickname is already taken."),
    EMAIL_ALREADY_IN_USE("3", "Email is already taken."),
    TOKEN_ALREADY_IN_USE("4", "Token is already taken."),
    PROPERTY_VALIDATION_ERROR("5", "One of properties is not valid."),
    NO_SUCH_USER("6", "User was not found."),
    INVALID_PASSWORD("7", "Password is invalid.");

    // ------------------------------------------------------------------------
    private String code;
    private String message;

    ErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
